home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Sound / EasyACDDA / Docs / CDDA.doc < prev    next >
Text File  |  2002-10-28  |  7KB  |  149 lines

  1. Short: play and save digital audio
  2. Type: disk/cdrom
  3. Uploader: mlelstv@serpens.swb.de
  4. Author: mlelstv@serpens.swb.de
  5.  
  6. Read audio data from a CD-DA disk (normal audio CDs) and play back
  7. via audio.device (22kHz) and store to outputfile either in 16bit, stereo,
  8. 44.1kHz AIFF or in 8bit, mono or stereo, 22.05kHz 8SVX.
  9.  
  10. usage:
  11.  
  12. cdda START,LENGTH,TRACK/N,VOL=VOLUME/N,FILE,8SVX/S,MAUD/S,WAV/S,16BIT/S,
  13.      MONO/S,MUTE/S,LIST/S,DEBUG/S,BUFS/N,QLEN/N,PLAN,TMP,NOFILTER/S:
  14.  
  15. START  = startblock
  16. LENGTH = number of blocks
  17. TRACK  = start relativ to track number
  18. VOL    = volume in percent (0..800)
  19. FILE   = file to save to
  20. 8SVX   = use 8SVX format instead of AIFF
  21. MAUD   = use MAUD format instead of AIFF
  22. WAV    = use WAV format instead of AIFF (disables audio)
  23. 16BIT  = experimental high resolution mode for audio output
  24. MONO   = map stereo to single channel and write mono 8SVX
  25. MUTE   = disable audio output completely
  26. LIST   = show table of contents
  27. DEBUG  = print lots of debugging info through debug.lib (use sushi!)
  28. BUFS   = number of CD blocks to do in a single read.. default is 8.
  29. QLEN   = length of CD-ROM input queue, default is 16.
  30. PLAN   = method to access the CD-ROM, current plans are 'a','b' and 'c'
  31.          'a' is for Sony CDU 8003 and compatible
  32.          'b' is for Toshiba XM3401TA and compatible
  33.          'c' is for NEC 2X and 3X
  34.          'd' is for some Grundig CD-ROMs, may work on Toshiba drives
  35.          'e' is for ATAPI (standard command)
  36.          'f' is for ATAPI (pre-standard command, never seen such a drive)
  37.          the program detects some drives itself but you can force it
  38.          to use a specific plan with that option
  39. TMP    = temporary file to store second channel in 8SVX mode.
  40. NOFILTER = when downsampling to 22kHz audio, don't filter. Reduces CPU
  41.            usage a little.
  42.  
  43. You can use the environment variables CDDA_DEVICE and CDDA_UNIT to choose
  44. something else than the default ("scsi.device" and 2).
  45.  
  46. To accomodate for older device drivers you can ask for a specific memory type
  47. used for all SCSI-direct buffers. This is done with the environment variable
  48. CDDA_BUFMEMTYPE. A value of 2 asks for chip memory, a value of 512 asks for
  49. memory reachable by Zorro-2 DMA controllers. Even for controllers that do
  50. not need a specific memory type it might show better performance.
  51.  
  52. There's a tiny program called 'led' in the archive which toggles the
  53. audio lowpass filter on newer machines. Disabling the lowpass filter
  54. will usually get better audio quality but may cause aliasing distortion
  55. depending on the bandwidth of your speakers.
  56.  
  57. Version 1.11 and newer of this program no longer saves data in RAW format.
  58. Instead it writes an AIFF header so that other programs can easily identify the
  59. data. If you select the 8SVX switch then cdda will write in IFF 8SVX format
  60. instead.
  61.  
  62. Version 1.24 and newer can also write the MAUD format used by software for
  63. the Toccata 16bit audio card.
  64.  
  65. 8SVX output is affected by the VOL and MONO setting so that you can scale
  66. the output for maximum dynamic range within the 8 bits of 8SVX, you can also
  67. select either mono or stereo output. 8SVX samples are reduced to a sample rate
  68. of 22050Hz for easy play back with any Amiga 8SVX player. Actually you get
  69. exactly what you hear from cdda.
  70.  
  71. Neither AIFF, MAUD nor WAV output is affected by these settings, they always
  72. save the full 16bit data.
  73.  
  74. Saving in 8SVX stereo has a slight problem since 8SVX saves each channel in
  75. a contigous part of the file. cdda will alternate between both channels which
  76. causes lots of head movement and is therefore much slower.. usually too slow
  77. for a smooth audio output. I suggest to MUTE audio when saving 8SVX stereo
  78. files.
  79.  
  80. Another point. Seeking in large files requires reading of 'extension blocks'
  81. which point to the actual data. There can be lots of extension blocks for
  82. large files which are best cached in RAM with the ADDBUFFERS command. The
  83. typical 30Megabyte file for a song needs about 900 buffers on partitions
  84. with 512 byte per block. Another solution is to create a harddisk partition
  85. with larger blocks (possible with the ROM filesystem from AmigaOS 3.1)
  86. which can reduce the need for extension blocks a lot (with 2048 byte/block
  87. you just need 36 extension blocks for the 30Megabyte file).
  88.  
  89. If you have 2 disks or a large RAM disk you can use the TMP option to
  90. circumvent the problems with stereo 8SVX. cdda will store the data from
  91. the right channel into the file passed with the TMP option. When all data
  92. has been recorded it will append this data to the real output file and delete
  93. the temporary afterwards. If you put the TMP file on the same physical disk
  94. as the output file this might result in even heavier disk activity than when
  95. using a single file, it saves you from having tons of buffers though since
  96. no seeking is done within a file.
  97.  
  98. Version 1.37 supports the NEC 3X (and possibly NEC 2X) CD-ROM drives which
  99. have two problems.
  100.  
  101. First, any command send to the drive while reading audio data disrupts the
  102. data stream _without any notice or error condition_. Then audio data is
  103. definitely lost, and if an odd number of bytes is lost the byte order of the
  104. data gets changed and the result is lots noise. I haven't found any possibility
  105. to detect such a condition or to prevent other programs from sending commands.
  106. Unfortunately this also includes most CD-ROM filesystems or SCSI drivers that
  107. poll the unit for disk changes.
  108.  
  109. Second, the NEC 3X does not disconnect from the bus while reading audio data
  110. (it does normally when reading CD-ROM disks). That's why this version of cdda
  111. allows finer control of the queuing parameters. Previously you could
  112. set the size of the I/O buffers with the BUFS parameter (in units of CDDA
  113. blocks). Now you can also change the length of the input queue which is
  114. the number of I/O buffers used for the CD-ROM. The total buffer size is
  115. therefore BUFS * QLEN * 2352 Bytes or BUFS * QLEN / 75 seconds. Small buffers
  116. improve throughput on the SCSI bus (the NEC 3X doesn't like BUFS=1 though)
  117. but increase CPU load.
  118.  
  119. Version 1.40 fixes a few bugs in 1.37.
  120.  
  121. Version 1.50 adds some compatibility code. It also fixes the problem
  122. with reading the end of the CD. The reader code always tried to read
  123. BUFS blocks even when this extended the read beyond the end of the
  124. disk. This results in "No more data" messages on drives that do
  125. not return partial blocks in this case.
  126.  
  127. Version 1.51 handles the "no seek complete" message.
  128.  
  129. Version 1.53 detects Pioneer DR-* and DRM* CD-ROM as compatible with PLAN a.
  130.  
  131. Version 1.54 recompile with latest SAS/C
  132.  
  133. Version 1.55 experimental code for IDE drives and drivers that send ATAPI
  134. commands transparently (PLAN e and f for ATAPI and a former proprietary
  135. command). A test with IDEfix crashes the machine though.
  136.  
  137. Version 1.57 fixed a bug in ATAPI support, now plays a few seconds and then
  138. crashes. Could be an Idefix bug.
  139.  
  140. Version 1.60 added WAV file output, this will automatically mute audio
  141. because the data isn't byteswapped for WAV (the audio routines need
  142. bytes swapping).
  143.  
  144. Version 1.64 enabled BUFS for ATAPI. Seems to work stable together with
  145. atapi.device 118.3 and idefix.library 99.1.
  146.  
  147. Michael van Elst
  148.  
  149.